import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/components/Home.vue'

import CovidInfo from '@/components/epidemic/CovidInfo.vue'
import Vaccines from '@/components/epidemic/Vaccines.vue'
import ChinaHot from '@/components/hotPoint/ChinaHot'
import EarthHot from '@/components/hotPoint/EarthHot.vue'
import ChinaMap from '@/components/chinaChart/Map.vue'
import EarthMap from '@/components/earthChart/Map.vue'
import ChinaGraph from '@/components/chinaChart/StaGraph.vue'
import RiskArea from '@/components/chinaChart/RiskArea.vue'
import Vaccination from '@/components/earthChart/Vaccination.vue'

Vue.use(VueRouter)

const routes = [{
  path: '',
  redirect: '/home'
}, {
  path: '/home',
  component: Home,
  redirect: '/home/CovidInfo',
  children: [{
    path: 'CovidInfo',
    component: CovidInfo
  }, {
    path: 'Vaccines',
    component: Vaccines
  }, {
    path: 'ChinaHot',
    component: ChinaHot
  }, {
    path: 'EarthHot',
    component: EarthHot
  }, {
    path: 'ChinaMap',
    component: ChinaMap
  }, {
    path: 'EarthMap',
    component: EarthMap
  }, {
    path: 'ChinaGraph',
    component: ChinaGraph
  }, {
    path: 'RiskArea',
    component: RiskArea
  }, {
    path: 'Vaccination',
    component: Vaccination
  }]
}]

const router = new VueRouter({
  routes
})

export default router
